﻿///////////////////////////////////////////////////////////////
// This is generated code. If you modify this code, be aware
// of the fact that when you re-generate the code, your changes
// are lost. If you want to keep your changes, make this file read-only
// when you have finished your changes, however it is recommended that
// you inherit from this class to extend the functionality of this generated
// class or you modify / extend the templates used to generate this code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 1.0.2005.1
// Code is generated on: Friday, March 07, 2008 3:18:12 PM
// Code is generated using templates: C# template set for SqlServer (1.0.2005.1)
// Templates vendor: Solutions Design.
// Templates version: 1.0.2005.1.111705
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using RPSDAL.EntityClasses;
using RPSDAL.HelperClasses;

using RPSDAL.CollectionClasses;

using SD.LLBLGen.Pro.ORMSupportClasses;

namespace RPSDAL.FactoryClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	

	
	/// <summary>Factory to create new, empty AvailableToContactTypeEntity objects.</summary>
	[Serializable]
	public partial class AvailableToContactTypeEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty AvailableToContactTypeEntity object.</summary>
		/// <returns>A new, empty AvailableToContactTypeEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new AvailableToContactTypeEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewAvailableToContactType
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new AvailableToContactTypeEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewAvailableToContactTypeUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.AvailableToContactTypeEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new AvailableToContactTypeCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "AvailableToContactTypeEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty BusinessRuleEntity objects.</summary>
	[Serializable]
	public partial class BusinessRuleEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty BusinessRuleEntity object.</summary>
		/// <returns>A new, empty BusinessRuleEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new BusinessRuleEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewBusinessRule
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new BusinessRuleEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewBusinessRuleUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.BusinessRuleEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new BusinessRuleCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "BusinessRuleEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty BusinessRuleMailedContactEntity objects.</summary>
	[Serializable]
	public partial class BusinessRuleMailedContactEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty BusinessRuleMailedContactEntity object.</summary>
		/// <returns>A new, empty BusinessRuleMailedContactEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new BusinessRuleMailedContactEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewBusinessRuleMailedContact
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new BusinessRuleMailedContactEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewBusinessRuleMailedContactUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.BusinessRuleMailedContactEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new BusinessRuleMailedContactCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "BusinessRuleMailedContactEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty CallEntity objects.</summary>
	[Serializable]
	public partial class CallEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty CallEntity object.</summary>
		/// <returns>A new, empty CallEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new CallEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCall
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new CallEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.CallEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new CallCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "CallEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty CallFinishedDropdownFieldValueEntity objects.</summary>
	[Serializable]
	public partial class CallFinishedDropdownFieldValueEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty CallFinishedDropdownFieldValueEntity object.</summary>
		/// <returns>A new, empty CallFinishedDropdownFieldValueEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new CallFinishedDropdownFieldValueEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedDropdownFieldValue
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new CallFinishedDropdownFieldValueEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedDropdownFieldValueUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.CallFinishedDropdownFieldValueEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new CallFinishedDropdownFieldValueCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "CallFinishedDropdownFieldValueEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty CallFinishedPageFieldEntity objects.</summary>
	[Serializable]
	public partial class CallFinishedPageFieldEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty CallFinishedPageFieldEntity object.</summary>
		/// <returns>A new, empty CallFinishedPageFieldEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new CallFinishedPageFieldEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedPageField
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new CallFinishedPageFieldEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedPageFieldUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.CallFinishedPageFieldEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new CallFinishedPageFieldCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "CallFinishedPageFieldEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty CallFinishedValueEntity objects.</summary>
	[Serializable]
	public partial class CallFinishedValueEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty CallFinishedValueEntity object.</summary>
		/// <returns>A new, empty CallFinishedValueEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new CallFinishedValueEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedValue
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new CallFinishedValueEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewCallFinishedValueUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.CallFinishedValueEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new CallFinishedValueCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "CallFinishedValueEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactEntity objects.</summary>
	[Serializable]
	public partial class ContactEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactEntity object.</summary>
		/// <returns>A new, empty ContactEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContact
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactFieldEntity objects.</summary>
	[Serializable]
	public partial class ContactFieldEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactFieldEntity object.</summary>
		/// <returns>A new, empty ContactFieldEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactFieldEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactField
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactFieldEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactFieldUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactFieldEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactFieldCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactFieldEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactFileEntity objects.</summary>
	[Serializable]
	public partial class ContactFileEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactFileEntity object.</summary>
		/// <returns>A new, empty ContactFileEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactFileEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactFile
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactFileEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactFileUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactFileEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactFileCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactFileEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactGroupEntity objects.</summary>
	[Serializable]
	public partial class ContactGroupEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactGroupEntity object.</summary>
		/// <returns>A new, empty ContactGroupEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactGroupEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactGroup
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactGroupEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactGroupUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactGroupEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactGroupCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactGroupEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactGroupMemberEntity objects.</summary>
	[Serializable]
	public partial class ContactGroupMemberEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactGroupMemberEntity object.</summary>
		/// <returns>A new, empty ContactGroupMemberEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactGroupMemberEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactGroupMember
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactGroupMemberEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactGroupMemberUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactGroupMemberEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactGroupMemberCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactGroupMemberEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactHistoryEntity objects.</summary>
	[Serializable]
	public partial class ContactHistoryEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactHistoryEntity object.</summary>
		/// <returns>A new, empty ContactHistoryEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactHistoryEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactHistory
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactHistoryEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactHistoryUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactHistoryEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactHistoryCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactHistoryEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactPageDropdownFieldValueEntity objects.</summary>
	[Serializable]
	public partial class ContactPageDropdownFieldValueEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactPageDropdownFieldValueEntity object.</summary>
		/// <returns>A new, empty ContactPageDropdownFieldValueEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactPageDropdownFieldValueEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactPageDropdownFieldValue
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactPageDropdownFieldValueEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactPageDropdownFieldValueUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactPageDropdownFieldValueEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactPageDropdownFieldValueCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactPageDropdownFieldValueEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactPageFieldEntity objects.</summary>
	[Serializable]
	public partial class ContactPageFieldEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactPageFieldEntity object.</summary>
		/// <returns>A new, empty ContactPageFieldEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactPageFieldEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactPageField
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactPageFieldEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactPageFieldUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactPageFieldEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactPageFieldCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactPageFieldEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty ContactTypeEntity objects.</summary>
	[Serializable]
	public partial class ContactTypeEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty ContactTypeEntity object.</summary>
		/// <returns>A new, empty ContactTypeEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new ContactTypeEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactType
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new ContactTypeEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewContactTypeUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.ContactTypeEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new ContactTypeCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "ContactTypeEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty LetterEntity objects.</summary>
	[Serializable]
	public partial class LetterEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty LetterEntity object.</summary>
		/// <returns>A new, empty LetterEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new LetterEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewLetter
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new LetterEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewLetterUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.LetterEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new LetterCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "LetterEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty MailSettingEntity objects.</summary>
	[Serializable]
	public partial class MailSettingEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty MailSettingEntity object.</summary>
		/// <returns>A new, empty MailSettingEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new MailSettingEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewMailSetting
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new MailSettingEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewMailSettingUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.MailSettingEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new MailSettingCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "MailSettingEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty RoleEntity objects.</summary>
	[Serializable]
	public partial class RoleEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty RoleEntity object.</summary>
		/// <returns>A new, empty RoleEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new RoleEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewRole
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new RoleEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewRoleUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.RoleEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new RoleCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "RoleEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty SettingEntity objects.</summary>
	[Serializable]
	public partial class SettingEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty SettingEntity object.</summary>
		/// <returns>A new, empty SettingEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new SettingEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewSetting
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new SettingEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewSettingUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.SettingEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new SettingCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "SettingEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty TemplateEntity objects.</summary>
	[Serializable]
	public partial class TemplateEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty TemplateEntity object.</summary>
		/// <returns>A new, empty TemplateEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new TemplateEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTemplate
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new TemplateEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTemplateUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.TemplateEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new TemplateCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "TemplateEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty UserEntity objects.</summary>
	[Serializable]
	public partial class UserEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty UserEntity object.</summary>
		/// <returns>A new, empty UserEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new UserEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUser
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new UserEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUserUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.UserEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new UserCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "UserEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty UserLogEntity objects.</summary>
	[Serializable]
	public partial class UserLogEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty UserLogEntity object.</summary>
		/// <returns>A new, empty UserLogEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new UserLogEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUserLog
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new UserLogEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUserLogUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.UserLogEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new UserLogCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "UserLogEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty UserResponsibleForPrintingLettersEntity objects.</summary>
	[Serializable]
	public partial class UserResponsibleForPrintingLettersEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty UserResponsibleForPrintingLettersEntity object.</summary>
		/// <returns>A new, empty UserResponsibleForPrintingLettersEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new UserResponsibleForPrintingLettersEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUserResponsibleForPrintingLetters
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new UserResponsibleForPrintingLettersEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewUserResponsibleForPrintingLettersUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.UserResponsibleForPrintingLettersEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new UserResponsibleForPrintingLettersCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "UserResponsibleForPrintingLettersEntity"; }
		}

		#region Included Code

		#endregion
	}
	
	/// <summary>Factory to create new, empty WelcomeTemplateEntity objects.</summary>
	[Serializable]
	public partial class WelcomeTemplateEntityFactory : IEntityFactory
	{
		/// <summary>Creates a new, empty WelcomeTemplateEntity object.</summary>
		/// <returns>A new, empty WelcomeTemplateEntity object.</returns>
		public virtual IEntity Create()
		{
			IEntity toReturn = new WelcomeTemplateEntity(new PropertyDescriptorFactory(), this);
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewWelcomeTemplate
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;

		}
		
		/// <summary>Creates a new WelcomeTemplateEntity instance but uses a special constructor which will set the Fields object of the new
		/// IEntity instance to the passed in fields object. Implement this method to support multi-type in single table inheritance.</summary>
		/// <param name="fields">Populated IEntityFields object for the new IEntity to create</param>
		/// <returns>Fully created and populated (due to the IEntityFields object) IEntity object</returns>
		public virtual IEntity Create(IEntityFields fields)
		{
			IEntity toReturn = Create();
			toReturn.Fields = fields;
			
			// __LLBLGENPRO_USER_CODE_REGION_START CreateNewWelcomeTemplateUsingFields
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			return toReturn;
		}

		/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields object for the entity to create. This method is used by internal code to create the fields object to store fetched data. 
		/// </summary>
		/// <returns>Empty IEntityFields object.</returns>
		public virtual IEntityFields CreateFields()
		{
			return EntityFieldsFactory.CreateEntityFieldsObject(RPSDAL.EntityType.WelcomeTemplateEntity);
		}
		
		/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
		/// <returns>IEntityFields object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
		public virtual IEntityFields CreateHierarchyFields()
		{
			return this.CreateFields();
		}
		
		/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
		/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
		public virtual IRelationCollection CreateHierarchyRelations()
		{
			return null;			
		}

		/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
		/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
		/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
		/// <returns>the factory for the entity which is represented by the values passed in.</returns>
		public virtual IEntityFactory GetEntityFactory(object[] fieldValues, Hashtable entityFieldStartIndexesPerEntity)
		{
			return this;
		}
		
		/// <summary>Creates a new entity collection for the entity of this factory.</summary>
		/// <returns>ready to use new entity collection, typed.</returns>
		public virtual IEntityCollection CreateEntityCollection()
		{
			return new WelcomeTemplateCollection();
		}
		
		/// <summary>returns the name of the entity this factory is for, e.g. "EmployeeEntity"</summary>
		public virtual string ForEntityName 
		{ 
			get { return "WelcomeTemplateEntity"; }
		}

		#region Included Code

		#endregion
	}


	/// <summary>Factory to create new, empty Entity objects based on the entity type specified. Uses entity specific factory objects
	/// </summary>
	[Serializable]
	public partial class GeneralEntityFactory
	{
		/// <summary>Creates a new, empty Entity object of the type specified</summary>
		/// <param name="entityTypeToCreate">The entity type to create.</param>
		/// <returns>A new, empty Entity object.</returns>
		public static IEntity Create(EntityType entityTypeToCreate)
		{
			IEntityFactory factoryToUse = null;
			switch(entityTypeToCreate)
			{
				case RPSDAL.EntityType.AvailableToContactTypeEntity:
					factoryToUse = new AvailableToContactTypeEntityFactory();
					break;
				case RPSDAL.EntityType.BusinessRuleEntity:
					factoryToUse = new BusinessRuleEntityFactory();
					break;
				case RPSDAL.EntityType.BusinessRuleMailedContactEntity:
					factoryToUse = new BusinessRuleMailedContactEntityFactory();
					break;
				case RPSDAL.EntityType.CallEntity:
					factoryToUse = new CallEntityFactory();
					break;
				case RPSDAL.EntityType.CallFinishedDropdownFieldValueEntity:
					factoryToUse = new CallFinishedDropdownFieldValueEntityFactory();
					break;
				case RPSDAL.EntityType.CallFinishedPageFieldEntity:
					factoryToUse = new CallFinishedPageFieldEntityFactory();
					break;
				case RPSDAL.EntityType.CallFinishedValueEntity:
					factoryToUse = new CallFinishedValueEntityFactory();
					break;
				case RPSDAL.EntityType.ContactEntity:
					factoryToUse = new ContactEntityFactory();
					break;
				case RPSDAL.EntityType.ContactFieldEntity:
					factoryToUse = new ContactFieldEntityFactory();
					break;
				case RPSDAL.EntityType.ContactFileEntity:
					factoryToUse = new ContactFileEntityFactory();
					break;
				case RPSDAL.EntityType.ContactGroupEntity:
					factoryToUse = new ContactGroupEntityFactory();
					break;
				case RPSDAL.EntityType.ContactGroupMemberEntity:
					factoryToUse = new ContactGroupMemberEntityFactory();
					break;
				case RPSDAL.EntityType.ContactHistoryEntity:
					factoryToUse = new ContactHistoryEntityFactory();
					break;
				case RPSDAL.EntityType.ContactPageDropdownFieldValueEntity:
					factoryToUse = new ContactPageDropdownFieldValueEntityFactory();
					break;
				case RPSDAL.EntityType.ContactPageFieldEntity:
					factoryToUse = new ContactPageFieldEntityFactory();
					break;
				case RPSDAL.EntityType.ContactTypeEntity:
					factoryToUse = new ContactTypeEntityFactory();
					break;
				case RPSDAL.EntityType.LetterEntity:
					factoryToUse = new LetterEntityFactory();
					break;
				case RPSDAL.EntityType.MailSettingEntity:
					factoryToUse = new MailSettingEntityFactory();
					break;
				case RPSDAL.EntityType.RoleEntity:
					factoryToUse = new RoleEntityFactory();
					break;
				case RPSDAL.EntityType.SettingEntity:
					factoryToUse = new SettingEntityFactory();
					break;
				case RPSDAL.EntityType.TemplateEntity:
					factoryToUse = new TemplateEntityFactory();
					break;
				case RPSDAL.EntityType.UserEntity:
					factoryToUse = new UserEntityFactory();
					break;
				case RPSDAL.EntityType.UserLogEntity:
					factoryToUse = new UserLogEntityFactory();
					break;
				case RPSDAL.EntityType.UserResponsibleForPrintingLettersEntity:
					factoryToUse = new UserResponsibleForPrintingLettersEntityFactory();
					break;
				case RPSDAL.EntityType.WelcomeTemplateEntity:
					factoryToUse = new WelcomeTemplateEntityFactory();
					break;
			}
			return factoryToUse.Create();
		}		
	}
}
